import {GET_CATEGORY_DATA,RECEIVE_CATEGORY_DATA,GET_ARTICLE_DATA,RECEIVE_ARTICLE_DATA,GET_SHARE_DATA,RECEIVE_SHARE_DATA} from './actionTypes'
import {GET_DATA_BY_CATEGORY,RECEIVE_DATA_BY_CATEGORY} from '../store/actionTypes'
import {GET_DATA_BY_TIME,RECEIVE_DATA_BY_TIME} from '../store/actionTypes'
import {GET_DATA_BY_SEARCH,RECEIVE_DATA_BY_SEARCH} from '../store/actionTypes'
import {GET_DETAIL_BY_ID,RECEIVE_DETAIL_BY_ID} from '../store/actionTypes'
import {GET_DATA_BY_ID,RECEIVE_DATA_BY_ID} from '../store/actionTypes'
import {fromJS} from 'immutable'

export const getCateGoryData=()=>{
    return {
        type:GET_CATEGORY_DATA,
    }
}
export const receiveCateGoryData=(data)=>{
    return{
        type:RECEIVE_CATEGORY_DATA,
        data:fromJS(data)
    }
}
export const getArticleData = (data)=>{
    return{
        type:GET_ARTICLE_DATA,
        data:fromJS(data)
    }
}
export const receiveArticleData = (data)=>{
    return{
        type:RECEIVE_ARTICLE_DATA,
        data:fromJS(data)
    }
}
export const getShareData = (data)=>{
    return{
        type:GET_SHARE_DATA,
        data:fromJS(data)
    }
}
export const receiveShareData = (data)=>{
    return{
        type:RECEIVE_SHARE_DATA,
        data:fromJS(data)
    }
}
export const getDataByCategory = (data)=>{
    return{
        type:GET_DATA_BY_CATEGORY,
        data:fromJS(data)
    }
}
export const receiveDataByCategory = (data)=>{
    return{
        type:RECEIVE_DATA_BY_CATEGORY,
        data:fromJS(data)
    }
}
export const getDataByTime = (data)=>{
    return{
        type:GET_DATA_BY_TIME,
        data:fromJS(data)
    }
}
export const receiveDataByTime = (data)=>{
    return{
        type:RECEIVE_DATA_BY_TIME,
        data:fromJS(data)
    }
}
export const getDataBySearch = (data)=>{
    return{
        type:GET_DATA_BY_SEARCH,
        data:fromJS(data)
    }
}
export const receiveDataBySearch = (data)=>{
    return{
        type:RECEIVE_DATA_BY_SEARCH,
        data:fromJS(data)
    }
}
export const getDetailById = (data)=>{
    return{
        type:GET_DETAIL_BY_ID,
        data:fromJS(data)
    }
}
export const receiveDetailById = (data)=>{
    return{
        type:RECEIVE_DETAIL_BY_ID,
        data:fromJS(data)
    }
}
